package com.usian.order.feign;

import com.usian.common.Result;
import com.usian.common.ResultCodeEnum;
import com.usian.entity.Cars;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient("cars")
public interface CarFeignClient {
    @GetMapping("/cars/cars/getCarByCarId/{carId}")
    public Result<Cars> getCarByCarId(@PathVariable Integer carId);

    @GetMapping("/cars/car-images/getCarImagesByCarId/{carId}")
    public Result<String> getCarImagesByCarId(@PathVariable Integer carId);

    @Operation(summary = "修改全部车辆收藏")
    @PutMapping("/cars/cars/updateFavorites")
    public Result<Boolean> updateFavorites();

    @Operation(summary = "修改车辆收藏")
    @PutMapping("/cars/cars/updateFavoritesAll/{carId}")
    public Result<Boolean> updateFavoritesAll(@PathVariable Integer carId);

}